<seed-content>
  <seed-toolbar-header>
    <seed-toolbar-title>客户详情</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>
  <seed-infinite-scroll
    class="search-results"
    (infiniteScroll)="getInfo(currentIndex)"
  >
  <div class="content">
  <header class="border-top">
    <div #master class="item drop-down-master seed-flexbox seed-flexbox-content-between seed-flexbox-align-center">
      <span class="name">学员状态</span>
      <p class="status seed-flexbox seed-flexbox-align-center" (click)="showDropDown()">
        {{statusArr[dataStore.studentInfo.studentStatus]}}
        <span class="arrow" [class.show-modal]="isShowDropDown"></span>
      </p>
    </div>
    <div class="gap"></div>
    <div class="item seed-underline seed-flexbox seed-flexbox-content-between seed-flexbox-align-center">
      <span class="name">姓名</span>
      <p class="status">{{dataStore.studentInfo.name}}</p>
    </div>
    <div *ngIf="dataStore.studentInfo.sex" class="item seed-underline seed-flexbox seed-flexbox-content-between seed-flexbox-align-center">
      <span class="name">性别</span>
      <p class="status">{{dataStore.studentInfo.sex == 1 ? '男' : '女'}}</p>
    </div>
    <div class="item seed-underline seed-flexbox seed-flexbox-content-between seed-flexbox-align-center">
      <span class="phone">拨打电话</span>
      <a class="tel" href="{{'tel:' + dataStore.studentInfo.parentMobile}}">{{dataStore.studentInfo.parentMobile}}</a>
    </div>
    <div class="gap"></div>
  </header>
    <div class="detail">
      <seed-tab (tabSelect)="selectIndex($event)">
        <seed-tab-item [title]="'跟进'">
          <seed-sale-detail-item [hasLoad]="dataStore.follow.hasLoad" [type]="'follow'" [list]="dataStore.follow.list"></seed-sale-detail-item>
        </seed-tab-item>
        <seed-tab-item [title]="'试课'">
          <seed-sale-detail-item [hasLoad]="dataStore.trial.hasLoad" [type]="'class'" [list]="dataStore.trial.list"></seed-sale-detail-item>
        </seed-tab-item>
        <seed-tab-item [title]="'资料'">
          <div class="info">
            <div class="info-item seed-underline seed-flexbox seed-flexbox-content-between seed-flexbox-align-center">
              <span class="title">监护人手机</span>
              <span class="value">{{dataStore.studentInfo.parentMobile}}</span>
            </div>
            <div class="info-item seed-underline seed-flexbox seed-flexbox-content-between seed-flexbox-align-center">
              <span class="title">姓名</span>
              <span class="value">{{dataStore.studentInfo.name}}</span>
            </div>
            <div *ngIf="dataStore.studentInfo.sex" class="info-item seed-underline seed-flexbox seed-flexbox-content-between seed-flexbox-align-center">
              <span class="title">性别</span>
              <span class="value">{{dataStore.studentInfo.sex == 1 ? '男' : '女'}} <seed-icons class="arrow" ></seed-icons></span>
            </div>
            <div class="info-item address seed-flexbox seed-flexbox-content-between">
              <span class="title">
                家庭住址
              </span>
              <p class="value seed-flexbox-item">{{dataStore.studentInfo.address}}</p>
            </div>
          </div>
        </seed-tab-item>
      </seed-tab>
    </div>
  </div>
    <seed-infinite-scroll-content *ngIf="tabStatusArr[currentIndex].showScrollMsg"></seed-infinite-scroll-content>
  </seed-infinite-scroll>
    <seed-submit-button *ngIf="currentIndex === 1" [btnText]="'添加试课'" class="seed-scroll-outside btn-bottom" (submit)="goToClassList()"></seed-submit-button>
    <seed-submit-button
      *ngIf="currentIndex === 0"
      [btnText]="'办理报名'" [hasLeftBtn]="'添加跟进记录'"
      [leftBtnText]="'添加跟进记录'"
      (submit)="goToRegistration()"
      (onLeftBtnClick)="showEditRecord()"
      class="seed-scroll-outside btn-bottom">
    </seed-submit-button>
  <seed-modal #record>
    <seed-sale-record class="seed-modal-content" (submit)="saveRecord($event)"></seed-sale-record>
  </seed-modal>
</seed-content>
<div class="mock-drop-down" *ngIf="isShowDropDown" (click)="hideDropDown()">
  <div class="drop-down" >
    <p class="drop-down-item seed-underline" (click)="setStatus(3)">跟进中</p>
    <p class="drop-down-item" (click)="setStatus(4)">流失学员</p>
  </div>
</div>
